package com.yu.admin.modules.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yu.admin.modules.system.pojo.SysUser;
import com.yu.admin.modules.system.pojo.dto.SysUserDTO;
import com.yu.admin.modules.system.pojo.vo.SysUserVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @since  2020-11-29 18:17:30
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    @Select("select id, username, status from sys_user")
    List<SysUserVo> getAllUserVOs();

    @Select("select college_id from sys_user where username = #{username}; ")
    Integer selectCollegeIdByUsername(@Param("username") String username);
}
